/***
 * @file:
 * @author: xiaoyu
 * @Date: 2021-07-06 17:24:45
 */
import { createStore } from "vuex";

import demo from "./modules/demo";

export default createStore({
  modules: {
    demo,
  },
  state: {
    user_token: "",
  },
  mutations: {
    SET_USER_TOKEN(state, data) {
      state.user_token = data;
    },
  },
  actions: {
    setUserToken({ commit }, data) {
      commit("SET_USER_TOKEN", data);
    },
  },
  getters: {
    getUserToken(state) {
      return state.user_token;
    },
  },
});
